<template>
	<view class="video_maks animation-fade" v-if="show">
		<video autoplay @ended="viedoEnd"  @fullscreenchange="fullscreenchange" :controls="false" class="popup-video"  :src="src">
			<cover-view class="cover_view" :style="{top:(response+15)+'px'}">
				<cover-image style="width: 64rpx;height: 64rpx;" src="/static/images/cole.png" @click="backChang"></cover-image>
			</cover-view>
		</video>
	</view>
</template>

<script>
	export default {
		name:"payvideo",
		props:{
			show:{
				type:Boolean,
				default:false
			},
			src:{
				type:String,
				default:''
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			backChang(){
				this.$emit('cancel')
			},
			viedoEnd(){
				this.$u.toast('播放结束啦~')
			}
		}
	}
</script>

<style lang="scss">
	.popup-video{
		width: 100%;
		height:100%;
		position: relative;
		
		.cover_view{
			position: absolute;
			
			left: 30rpx;
		}
	}
	.video_maks{
		position: fixed;
		top: 0;
		width: 100%;
		height: 100%;
		z-index: 11;
		background: rgba(0,0,0,0.9);
	}
</style>